#include "Sprite.h"

Sprite::Sprite()
{
	// do nothing
}

Sprite::~Sprite()
{
	// do nothing
}

void Sprite::loadFile(char* fileName)
{
	std::ifstream fileData(fileName);
	fileData >> nameTexture;
	fileData >> m_numSprite;
	m_Sprite = new cImage[m_numSprite];

	for (int index = 0; index < m_numSprite; index++)
	{
		fileData >> m_Sprite[index].image_id;
		fileData >> m_recycle;
		fileData >> m_Sprite[index].image_x;
		fileData >> m_recycle;
		fileData >> m_Sprite[index].image_y;
		fileData >> m_recycle;
		fileData >> m_Sprite[index].image_w;
		fileData >> m_recycle;
		fileData >> m_Sprite[index].image_h;
		fileData >> m_recycle;
		fileData >> m_recycle;

		fileData >> m_Sprite[index].image_possition_x;
		fileData >> m_recycle;
		fileData >> m_Sprite[index].image_possition_y;
		fileData >> m_recycle;
		fileData >> m_Sprite[index].image_possition_width;
		fileData >> m_recycle;
		fileData >> m_Sprite[index].image_possition_height;
		fileData >> m_recycle;
		fileData >> m_Sprite[index].image_velocity;

	}

	/*for (int i = 0; i < m_numSprite; i++)
	{
		for (int j = 0; j < 5; j++)
		{
			fileData >> sprite[i][j];
		}
	}

	fileData >> m_numSprite;*/
	//m_Animation = new int[4];
	fileData.close();
}